<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Modeling</title>
<?php echo importCSS("template.css|style.css|work.css|font.css");?>
<?php echo importJS("jquery.min.js");?>
</head>
<body>
<?php echo L('LANG_FONT');?>
<script> var THEME_ROOT = '__ROOT__/themes/' ; </script>
<div class="header clearfix">
	<div class="center">
    	<a href="<?php echo U('/index');?>"><div class="logo">
        	<img src="__ROOT__/themes/images/logo.png" />
        </div></a>
        <div class="menu">
        	<a href="<?php echo U('/work/index');?>" <?php echo ($nav_menu=="work"?" class='now'":"");?>><div><?php echo L('HEADER_WORK');?></div></a> <!-- class="now"-->
            <a href="<?php echo U('/contractor/index');?>" <?php echo ($nav_menu=="contractor"?" class='now'":"");?>><div><?php echo L('HEADER_CONTRACTOR');?></div></a>
            <a href="<?php echo U('/space/index');?>" <?php echo ($nav_menu=="space"?" class='now'":"");?>><div><?php echo L('HEADER_MY_SPACE');?></div></a>
        </div>
        <div class="search">
        	<div><img src="__ROOT__/themes/images/search.png" /></div>
        	<form method="get" action="<?php echo U('/work/index');?>" >
            <input type="text" id="search" name="name" value="<?php echo L('HEADER_SEARCH');?>" onfocus="if(value=='<?php echo L('HEADER_SEARCH');?>') {value=''} setStyleOne(this.id)" onblur="if (value=='') { value='<?php echo L('HEADER_SEARCH');?>' } setStyleTwo(this.id)"/>
            </form>
        </div>
        <?php if ($_cUser) { ?>
        <div class="signafter">
        	<a href="<?php echo U('/signout');?>"><div  class="outbutton"><?php echo L('HEADER_SIGN_OUT');?></div></a>
        	<a href="<?php echo U('/space/index');?>"><div class="word"><?php echo ($_cUser["username"]); ?></div></a>
        </div>
        <?php } else { ?>
        <div class="sign">
        	<a href="<?php echo U('/join');?>"><div><?php echo L('HEADER_JOIN');?></div></a>
            <a href="<?php echo U('/signin');?>"><div><?php echo L('HEADER_SIGN_IN');?></div></a>
        </div>
        <?php } ?>
    </div>
</div>
<div class="clear"></div>

<div class="main center clearfix">

	<div class="guidbox">
		<form method=get id=wsearch >
        <div class="searchbox">
            <div class="clear"></div>
            <div class="namebox box"><input type="text" id="name" name="name" value="" placeholder="<?php echo L('WORK_NAME');?>" onfocus="setStyleOne(this.id)" onblur="setStyleTwo(this.id)"/></div>
            <div class="typebox box">
            	<div class="inputimg"><img src="__ROOT__/themes/images/client-type.png" /></div>
                <div class="inputname"><?php echo L('CONTRACTOR_TYPE');?></div>
                <div id="dropDownList1" class="dropDownList dropdown">
  					<select class="hide" name="type">
                    	<option value=""><?php echo L('WORK_PLEASE_SELECT');?></option>
                    	<?php $cgtype = M("cgtype")->order("`order` asc")->select(); ?>
                    	<?php if(is_array($cgtype)): $i = 0; $__LIST__ = $cgtype;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$data): $mod = ($i % 2 );++$i;?><option value="<?php echo ($data["id"]); ?>"><?php echo L($data['cgtypename']);?></option><?php endforeach; endif; else: echo "" ;endif; ?>
  					</select>
  					<span class=""><?php echo L('WORK_PLEASE_SELECT');?></span>
            		<ul class="">
            		</ul>
        		</div>
        	</div>
            <div class="dosearch">
            	<a class="button" id="dosearch" href="javascript:void(0)" onclick="$('#wsearch').submit()"><?php echo L('CONTRACTOR_SEARCH');?></a>
            </div>
            <div class="advance">
            	<a href="javascript:void(0);" class="now" style="display:none;" id="open_ao" onclick="jQuery('#open_ao').hide();jQuery('#close_ao').show();jQuery('#advancebox').slideUp();"><?php echo L('WORK_ADVANCED');?></a>
                <a href="javascript:void(0);" id="close_ao" onclick="jQuery('#close_ao').hide();jQuery('#open_ao').show();jQuery('#advancebox').slideDown();"><?php echo L('WORK_ADVANCED');?></a>
            </div>
            <div class="clear"></div>
            <div id="advancebox" style="display:none;">
            	<div class="timebox box">
            		<div class="inputimg"><img src="__ROOT__/themes/images/client-time.png" /></div>
                	<div class="inputname"><?php echo L('WORK_TIME');?></div>
                	<div id="dropDownList2" class="dropDownList dropdown">
                    	<select class="hide" name="time">
                  			<option value=""><?php echo L('WORK_PLEASE_SELECT');?></option>
   							<option value="3">3 <?php echo L('WORK_DAYS');?></option>
   							<option value="5">5 <?php echo L('WORK_DAYS');?></option>
   							<option value="10">10 <?php echo L('WORK_DAYS');?></option>
                    		<option value="15">15 <?php echo L('WORK_DAYS');?></option>
                    		<option value="20">20 <?php echo L('WORK_DAYS');?></option>
  						</select>
  						<span class=""><?php echo L('WORK_RECENT_DAYS');?></span>
            			<ul class="">
            			</ul>
        			</div>
        		</div>
                <div class="countrybox box">
    				<div class="inputimg"><img src="__ROOT__/themes/images/client-country.png" /></div>
            		<div class="inputname"><?php echo L('WORK_LOCAL');?></div>
                	<div class="choice"><img src="__ROOT__/themes/images/su-disagree.png" id="checkLocal"/></div>
            		<input type="hidden" id="local" name="local" value="0" />
    			</div>
            	<div class="budbox box">
            		<div class="inputimg"><img src="__ROOT__/themes/images/client-budget.png" /></div>
                	<div class="inputname"><?php echo L('CONTRACTOR_BUDGET');?></div>
                	<div id="dropDownList3" class="dropDownList dropdown">
                    	<select class="hide" name="budget">
                  			<option value="0"><?php echo L('WORK_PLEASE_SELECT');?></option>
                            <option value="1">$0-$1000</option>
   							<option value="2">$1000-$3000</option>
   							<option value="3">$3000-$5000</option>
   							<option value="4">$5000-$8000</option>
                    		<option value="5">$8000-$10000</option>
                            <option value="6">$10000-$15000</option>
                            <option value="7">$10000-$25000</option>
                            <option value="8">$25000-$40000</option>
                            <option value="9">$40000-$60000</option>
                            <option value="10">$60000-$100000</option>
                    		<option value="11">$100000 More</option>
  						</select>
  						<span class=""><?php echo L('WORK_PLEASE_SELECT');?></span>
            			<ul class="">
            			</ul>
        			</div>
        		</div>
            </div>
            <div class="clear"></div>
        </div>
        <div class="clear"></div>
        </form>
    </div>
    
    <div class="clear"></div>
    
    <div class="headline">
    	<div class="pname line"><?php echo L('CONTRACTOR_PROJECT_NAME');?></div>
        <div class="country line"><?php echo L('WORK_COUNTRY');?></div>
        <div class="pdate tline<?php echo ($sort=='dateup'||$sort=='datedown')?' now':'';?>"><?php echo L('WORK_PUBLISH_DATE');?></div>
        <div class="order">
        	<a id="dateup" href="<?php echo ($_url); ?>sort=dateup"><div class="arrow-up<?php echo ($sort=='dateup'?' now':''); ?>"></div></a>
            <a id="datedown" href="<?php echo ($_url); ?>sort=datedown"><div class="arrow-down<?php echo ($sort=='datedown'?' now':''); ?>"></div></a>
        </div>
        <div class="time tline<?php echo ($sort=='timeup'||$sort=='timedown')?' now':'';?>"><?php echo L('WORK_TIME_LEFT');?></div>
        <div class="order">
        	<a id="timeup" href="<?php echo ($_url); ?>sort=timeup"><div class="arrow-up<?php echo ($sort=='timeup'?' now':''); ?>"></div></a>
            <a id="timedown" href="<?php echo ($_url); ?>sort=timedown"><div class="arrow-down<?php echo ($sort=='timedown'?' now':''); ?>"></div></a>
        </div>
        <div class="bud tline<?php echo ($sort=='budup'||$sort=='budeup')?' now':'';?>"><?php echo L('CONTRACTOR_BUDGET');?></div>
        <div class="order">
        	<a id="budup" href="<?php echo ($_url); ?>sort=budup"><div class="arrow-up<?php echo ($sort=='budup'?' now':''); ?>"></div></a>
            <a id="budeup" href="<?php echo ($_url); ?>sort=budeup"><div class="arrow-down<?php echo ($sort=='budeup'?' now':''); ?>"></div></a>
        </div>
        <div class="com tline<?php echo ($sort=='comup'||$sort=='comdown')?' now':'';?>"><?php echo L('WORK_COMPETOR');?></div>
        <div class="order com">
        	<a id="comup" href="<?php echo ($_url); ?>sort=comup"><div class="arrow-up<?php echo ($sort=='comup'?' now':''); ?>"></div></a>
            <a id="comdown" href="<?php echo ($_url); ?>sort=comdown"><div class="arrow-down<?php echo ($sort=='comdown'?' now':''); ?>"></div></a>
        </div>
    </div>
    
    <div class="clear"></div>
    
    <table class="list">
    	<?php if(is_array($_list)): $i = 0; $__LIST__ = $_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr class="oneproject">
    		<td class="opname"><a href="<?php echo U('/work/view/'.$vo['id']);?>"><?php echo (h($vo["name"])); ?></a></td>
            <td class="opsta"><img src="__ROOT__/themes/images/st-bidding.png" /></td>
        	<td class="opcountry"><?php echo M('country')->getFieldByCode($vo['country'],"en");?></td>
        	<td class="opdate"><?php echo date('Y-m-d',$vo['pubtime']);?></td>
            <td class="optime"><?php echo (mdate($vo["endtime"])); ?></td>
            <td class="opbud">$ <?php echo (h($vo["budget"])); ?></td>
            <td class="opcom"><?php echo ($vo["bidcount"]); ?></td>
        </tr><?php endforeach; endif; else: echo "" ;endif; ?>
        <!--<tr class="oneproject">
    		<td class="opname">One suit of game sences</td>
            <td class="opsta"><img src="__ROOT__/themes/images/st-complete.png" /></td>
        	<td class="opcountry">CHINA</td>
        	<td class="opdate">2013-05-18</td>
            <td class="optime">28h</td>
            <td class="opbud">3500RMB</td>
            <td class="opcom">28</td>
        </tr>
        <tr class="oneproject">
    		<td class="opname">A movie charactor</td>
            <td class="opsta"><img src="__ROOT__/themes/images/st-working.png" /></td>
        	<td class="opcountry">CHINA</td>
        	<td class="opdate">2013-05-18</td>
            <td class="optime">28h</td>
            <td class="opbud">3500RMB</td>
            <td class="opcom">28</td>
        </tr>
        <tr class="oneproject">
    		<td class="opname">A movie charactor</td>
            <td class="opsta"><img src="__ROOT__/themes/images/st-working.png" /></td>
        	<td class="opcountry">CHINA</td>
        	<td class="opdate">2013-05-18</td>
            <td class="optime">28h</td>
            <td class="opbud">3500RMB</td>
            <td class="opcom">28</td>
        </tr>
        <tr class="oneproject">
    		<td class="opname">A movie charactor</td>
            <td class="opsta"><img src="__ROOT__/themes/images/st-working.png" /></td>
        	<td class="opcountry">CHINA</td>
        	<td class="opdate">2013-05-18</td>
            <td class="optime">28h</td>
            <td class="opbud">3500RMB</td>
            <td class="opcom">28</td>
        </tr>
        <tr class="oneproject">
    		<td class="opname">A movie charactor</td>
            <td class="opsta"><img src="__ROOT__/themes/images/st-working.png" /></td>
        	<td class="opcountry">CHINA</td>
        	<td class="opdate">2013-05-18</td>
            <td class="optime">28h</td>
            <td class="opbud">3500RMB</td>
            <td class="opcom">28</td>
        </tr>-->
        <tr class="status">
        	<td><div><?php echo L('WORK_COMPLETED');?></div><img src="__ROOT__/themes/images/st-complete.png" /></td>
            <td><div><?php echo L('WORK_WORKING');?></div><img src="__ROOT__/themes/images/st-working.png" /></td>
            <td><div><?php echo L('WORK_BIDDING');?></div><img src="__ROOT__/themes/images/st-bidding.png" /></td>           
            <td class="sta-tittle"><?php echo L('WORK_PROJECT_STATUS');?></td>
        </tr>
        <tr>
        	<td class="page"><?php echo ($_page); ?></td>
        </tr>
    </table>
    
</div>

<div class="footer">

</div>
<?php echo importJS("downlist.js|input.js|signup.js");?>
</body>
</html>